import math
from collections import defaultdict
from typing import List


class Solution:
    def judgePoint24(self, cards: List[int]) -> bool:
        c = defaultdict(int)
        self.exp_list = []
        self.exp = []
        operates = [lambda x, y: x + y, lambda x, y: x - y, lambda x, y: x * y, lambda x, y: x / y, lambda x, y: x % y,
                    lambda x, y: x ** y, math.comb, math.perm]
        op = ['+', '-', '*', '/', '%', '**', 'comb', 'perm']
        for card in cards:
            c[card] += 1

        def remove(key):
            c[key] -= 1
            if c[key] == 0:
                del c[key]

        def dfs():
            if len(c) == 1 and tuple(c.values())[0] == 1:
                if abs(tuple(c.keys())[0] - 24) <= 1e-4:
                    self.exp_list.append(self.exp[:])

            # 选两个
            for card1 in list(c.keys())[:]:
                if c[card1] <= 0: continue
                remove(card1)
                self.exp.append(card1)
                for card2 in list(c.keys())[:]:
                    if c[card2] <= 0: continue
                    remove(card2)
                    self.exp.append(card2)
                    for operate_id in range(len(operates)):
                        if card2 == 0 and (operate_id == 3 or operate_id == 4): continue
                        self.exp.append(op[operate_id])
                        result = operates[operate_id](card1, card2)
                        c[result] += 1
                        if dfs():
                            return True
                        remove(result)
                        self.exp.pop()
                    c[card2] += 1
                    self.exp.pop()
                c[card1] += 1
                self.exp.pop()
            return False

        dfs()
        return len(self.exp_list) > 0


if __name__ == '__main__':
    s = Solution()
    arr = list(map(int, input().split()))
    r = s.judgePoint24(arr)
    if r:
        for exp in s.exp_list:  # 注意：需要先修改 self.exp 收集为多个结果
            i = 0
            while i < len(exp):
                print(f"{exp[i + 0]}{exp[i + 2]}{exp[i + 1]}={eval(f'{exp[i + 0]}{exp[i + 2]}{exp[i + 1]}')}")
                i += 3
            print()
    else:
        print('无法完成')
